Attribute VB_Name = "basRASErrors"
'*---------------------------------------------------------------
'*
'* ModuleName:     basRASError
'* FileName:       RASERROR.BAS
'* Date:           July 1998
'* Author:         Ian M. Weatherburn
'* Company:        Mindkey Software Solutions (Pty) Ltd.
'* Copyright:      Copyright (C) 1998 by Mindkey Software Solutions
'*                 All Rights Reserved
'* Description:    RAS specific error codes
'*
'*---------------------------------------------------------------

Option Explicit

'*---------------------------------------------------------------
'* Constants
'*---------------------------------------------------------------
Public Const NOT_SUPPORTED = 120&
Public Const RAS_SUCCESS = 0&

Public Const RASBASE = 600&

' Pending Operation
Public Const PENDING = (RASBASE + 0)

' Port handle is invalid
Public Const ERROR_INVALID_PORT_HANDLE = (RASBASE + 1)

' Port is already open
Public Const ERROR_PORT_ALREADY_OPEN = (RASBASE + 2)

' Caller's buffer is too small
Public Const ERROR_BUFFER_TOO_SMALL = (RASBASE + 3)

' Wrong information is specified
Public Const ERROR_WRONG_INFO_SPECIFIED = (RASBASE + 4)

' Cannot set port information.
Public Const ERROR_CANNOT_SET_PORT_INFO = (RASBASE + 5)

' The port is not connected.
Public Const ERROR_PORT_NOT_CONNECTED = (RASBASE + 6)

' The event is invalid.
Public Const ERROR_EVENT_INVALID = (RASBASE + 7)

' The device does not exist.
Public Const ERROR_DEVICE_DOES_NOT_EXIST = (RASBASE + 8)

' The device type does not exist.
Public Const ERROR_DEVICETYPE_DOES_NOT_EXIST = (RASBASE + 9)

' The buffer is invalid.
Public Const ERROR_BUFFER_INVALID = (RASBASE + 10)

' The route is not available.
Public Const ERROR_ROUTE_NOT_AVAILABLE = (RASBASE + 11)

' The route is not allocated.
Public Const ERROR_ROUTE_NOT_ALLOCATED = (RASBASE + 12)

' Invalid compression specified.
Public Const ERROR_INVALID_COMPRESSION_SPECIFIED = (RASBASE + 13)

' Out of buffers.
Public Const ERROR_OUT_OF_BUFFERS = (RASBASE + 14)

' The port was not found.
Public Const ERROR_PORT_NOT_FOUND = (RASBASE + 15)

' An asynchronous request is pending.
Public Const ERROR_ASYNC_REQUEST_PENDING = (RASBASE + 16)

' The port or device is already disconnecting.
Public Const ERROR_ALREADY_DISCONNECTING = (RASBASE + 17)

' The port is not open.
Public Const ERROR_PORT_NOT_OPEN = (RASBASE + 18)

' The port is disconnected.
Public Const ERROR_PORT_DISCONNECTED = (RASBASE + 19)

' There are no endpoints.
Public Const ERROR_NO_ENDPOINTS = (RASBASE + 20)

' Cannot open the phone book file.
Public Const ERROR_CANNOT_OPEN_PHONEBOOK = (RASBASE + 21)

' Cannot load the phone book file.
Public Const ERROR_CANNOT_LOAD_PHONEBOOK = (RASBASE + 22)

' Cannot find the phone book entry.
Public Const ERROR_CANNOT_FIND_PHONEBOOK_ENTRY = (RASBASE + 23)

' Cannot write the phone book file.
Public Const ERROR_CANNOT_WRITE_PHONEBOOK = (RASBASE + 24)

' Invalid information found in the phone book file.
Public Const ERROR_CORRUPT_PHONEBOOK = (RASBASE + 25)

' Cannot load a string.
Public Const ERROR_CANNOT_LOAD_STRING = (RASBASE + 26)

' Cannot find key.
Public Const ERROR_KEY_NOT_FOUND = (RASBASE + 27)

' The port was disconnected.
Public Const ERROR_DISCONNECTION = (RASBASE + 28)

' The port was disconnected by the remote machine.
Public Const ERROR_REMOTE_DISCONNECTION = (RASBASE + 29)

' The port was disconnected due to hardware failure.
Public Const ERROR_HARDWARE_FAILURE = (RASBASE + 30)

' The port was disconnected by the user.
Public Const ERROR_USER_DISCONNECTION = (RASBASE + 31)

' The structure size is incorrect.
Public Const ERROR_INVALID_SIZE = (RASBASE + 32)

' The port is already in use or is not configured for Remote Access dial out.
Public Const ERROR_PORT_NOT_AVAILABLE = (RASBASE + 33)

' Cannot register your computer on on the remote network.
Public Const ERROR_CANNOT_PROJECT_CLIENT = (RASBASE + 34)

' Unknown error.
Public Const ERROR_UNKNOWN = (RASBASE + 35)

' The wrong device is attached to the port.
Public Const ERROR_WRONG_DEVICE_ATTACHED = (RASBASE + 36)

' The string could not be converted.
Public Const ERROR_BAD_STRING = (RASBASE + 37)

' The request has timed out.
Public Const ERROR_REQUEST_TIMEOUT = (RASBASE + 38)

' No asynchronous net available.
Public Const ERROR_CANNOT_GET_LANA = (RASBASE + 39)

' A NetBIOS error has occurred.
Public Const ERROR_NETBIOS_ERROR = (RASBASE + 40)

' The server cannot allocate NetBIOS resources needed to support the client.
Public Const ERROR_SERVER_OUT_OF_RESOURCES = (RASBASE + 41)

' One of your NetBIOS names is already registered on the remote network.
Public Const ERROR_NAME_EXISTS_ON_NET = (RASBASE + 42)

' A network adapter at the server failed.
Public Const ERROR_SERVER_GENERAL_NET_FAILURE = (RASBASE + 43)

' You will not receive network message popups.
Public Const WARNING_MSG_ALIAS_NOT_ADDED = (RASBASE + 44)

' Internal authentication error.
Public Const ERROR_AUTH_INTERNAL = (RASBASE + 45)

' The account is not permitted to logon at this time of day.
Public Const ERROR_RESTRICTED_LOGON_HOURS = (RASBASE + 46)

' The account is disabled.
Public Const ERROR_ACCT_DISABLED = (RASBASE + 47)

' The password has expired.
Public Const ERROR_PASSWD_EXPIRED = (RASBASE + 48)

' The account does not have Remote Access permission.
Public Const ERROR_NO_DIALIN_PERMISSION = (RASBASE + 49)

' The Remote Access server is not responding.
Public Const ERROR_SERVER_NOT_RESPONDING = (RASBASE + 50)

' Your modem =(or other connecting device) has reported an error.
Public Const ERROR_FROM_DEVICE = (RASBASE + 51)

' Unrecognized response from the device.
Public Const ERROR_UNRECOGNIZED_RESPONSE = (RASBASE + 52)

' A macro required by the device was not found in the device .INF file section.
Public Const ERROR_MACRO_NOT_FOUND = (RASBASE + 53)

' A command or response in the device .INF file section refers to an undefined macro.
Public Const ERROR_MACRO_NOT_DEFINED = (RASBASE + 54)

' The <message> macro was not found in the device .INF file secion.
Public Const ERROR_MESSAGE_MACRO_NOT_FOUND = (RASBASE + 55)

' The <defaultoff> macro in the device .INF file section contains an undefined macro.
Public Const ERROR_DEFAULTOFF_MACRO_NOT_FOUND = (RASBASE + 56)

' The device .INF file could not be opened.
Public Const ERROR_FILE_COULD_NOT_BE_OPENED = (RASBASE + 57)

' The device name in the device .INF or media .INI file is too long.
Public Const ERROR_DEVICENAME_TOO_LONG = (RASBASE + 58)

' The media .INI file refers to an unknown device name.
Public Const ERROR_DEVICENAME_NOT_FOUND = (RASBASE + 59)

' The device .INF file contains no responses for the command.
Public Const ERROR_NO_RESPONSES = (RASBASE + 60)

' The device .INF file is missing a command.
Public Const ERROR_NO_COMMAND_FOUND = (RASBASE + 61)

' Attempted to set a macro not listed in device .INF file section.
Public Const ERROR_WRONG_KEY_SPECIFIED = (RASBASE + 62)

' The media .INI file refers to an unknown device type.
Public Const ERROR_UNKNOWN_DEVICE_TYPE = (RASBASE + 63)

' Cannot allocate memory.
Public Const ERROR_ALLOCATING_MEMORY = (RASBASE + 64)

' The port is not configured for Remote Access.
Public Const ERROR_PORT_NOT_CONFIGURED = (RASBASE + 65)

' Your modem =(or other connecting device) is not functioning.
Public Const ERROR_DEVICE_NOT_READY = (RASBASE + 66)

' Cannot read the media .INI file.
Public Const ERROR_READING_INI_FILE = (RASBASE + 67)

' The connection dropped.
Public Const ERROR_NO_CONNECTION = (RASBASE + 68)

' The usage parameter in the media .INI file is invalid.
Public Const ERROR_BAD_USAGE_IN_INI_FILE = (RASBASE + 69)

' Cannot read the section name from the media .INI file.
Public Const ERROR_READING_SECTIONNAME = (RASBASE + 70)

' Cannot read the device type from the media .INI file.
Public Const ERROR_READING_DEVICETYPE = (RASBASE + 71)

' Cannot read the device name from the media .INI file.
Public Const ERROR_READING_DEVICENAME = (RASBASE + 72)

' Cannot read the usage from the media .INI file.
Public Const ERROR_READING_USAGE = (RASBASE + 73)

' Cannot read the maximum connection BPS rate from the media .INI file.
Public Const ERROR_READING_MAXCONNECTBPS = (RASBASE + 74)

' Cannot read the maximum carrier BPS rate from the media .INI file.
Public Const ERROR_READING_MAXCARRIERBPS = (RASBASE + 75)

' The line is busy.
Public Const ERROR_LINE_BUSY = (RASBASE + 76)

' A person answered instead of a modem.
Public Const ERROR_VOICE_ANSWER = (RASBASE + 77)

' There is no answer.
Public Const ERROR_NO_ANSWER = (RASBASE + 78)

' Cannot detect carrier.
Public Const ERROR_NO_CARRIER = (RASBASE + 79)

' There is no dial tone.
Public Const ERROR_NO_DIALTONE = (RASBASE + 80)

' General error reported by device.
Public Const ERROR_IN_COMMAND = (RASBASE + 81)

' ERROR_WRITING_SECTIONNAME
Public Const ERROR_WRITING_SECTIONNAME = (RASBASE + 82)

' ERROR_WRITING_DEVICETYPE
Public Const ERROR_WRITING_DEVICETYPE = (RASBASE + 83)

' ERROR_WRITING_DEVICENAME
Public Const ERROR_WRITING_DEVICENAME = (RASBASE + 84)

' ERROR_WRITING_MAXCONNECTBPS
Public Const ERROR_WRITING_MAXCONNECTBPS = (RASBASE + 85)

' ERROR_WRITING_MAXCARRIERBPS
Public Const ERROR_WRITING_MAXCARRIERBPS = (RASBASE + 86)

' ERROR_WRITING_USAGE
Public Const ERROR_WRITING_USAGE = (RASBASE + 87)

' ERROR_WRITING_DEFAULTOFF
Public Const ERROR_WRITING_DEFAULTOFF = (RASBASE + 88)

' ERROR_READING_DEFAULTOFF
Public Const ERROR_READING_DEFAULTOFF = (RASBASE + 89)

' ERROR_EMPTY_INI_FILE
Public Const ERROR_EMPTY_INI_FILE = (RASBASE + 90)

' Access denied because username and/or password is invalid on the domain.
Public Const ERROR_AUTHENTICATION_FAILURE = (RASBASE + 91)

' Hardware failure in port or attached device.
Public Const ERROR_PORT_OR_DEVICE = (RASBASE + 92)

' ERROR_NOT_BINARY_MACRO
Public Const ERROR_NOT_BINARY_MACRO = (RASBASE + 93)

' ERROR_DCB_NOT_FOUND
Public Const ERROR_DCB_NOT_FOUND = (RASBASE + 94)

' ERROR_STATE_MACHINES_NOT_STARTED
Public Const ERROR_STATE_MACHINES_NOT_STARTED = (RASBASE + 95)

' ERROR_STATE_MACHINES_ALREADY_STARTED
Public Const ERROR_STATE_MACHINES_ALREADY_STARTED = (RASBASE + 96)

' ERROR_PARTIAL_RESPONSE_LOOPING
Public Const ERROR_PARTIAL_RESPONSE_LOOPING = (RASBASE + 97)

' A response keyname in the device .INF file is not in the expected format.
Public Const ERROR_UNKNOWN_RESPONSE_KEY = (RASBASE + 98)

' The device response caused buffer overflow.
Public Const ERROR_RECV_BUF_FULL = (RASBASE + 99)

' The expanded command in the device .INF file is too long.
Public Const ERROR_CMD_TOO_LONG = (RASBASE + 100)

' The device moved to a BPS rate not supported by the COM driver.
Public Const ERROR_UNSUPPORTED_BPS = (RASBASE + 101)

' Device response received when none expected.
Public Const ERROR_UNEXPECTED_RESPONSE = (RASBASE + 102)

' ERROR_INTERACTIVE_MODE
Public Const ERROR_INTERACTIVE_MODE = (RASBASE + 103)

' ERROR_BAD_CALLBACK_NUMBER
Public Const ERROR_BAD_CALLBACK_NUMBER = (RASBASE + 104)

' ERROR_INVALID_AUTH_STATE
Public Const ERROR_INVALID_AUTH_STATE = (RASBASE + 105)

' ERROR_WRITING_INITBPS
Public Const ERROR_WRITING_INITBPS = (RASBASE + 106)

' X.25 diagnostic indication.
Public Const ERROR_X25_DIAGNOSTIC = (RASBASE + 107)

' The account has expired.
Public Const ERROR_ACCT_EXPIRED = (RASBASE + 108)

' Error changing password on domain.  The password may be too short or may match a previously used password.
Public Const ERROR_CHANGING_PASSWORD = (RASBASE + 109)

' Serial overrun errors were detected while communicating with your modem.
Public Const ERROR_OVERRUN = (RASBASE + 110)

' RasMan initialization failure.  Check the event log.
Public Const ERROR_RASMAN_CANNOT_INITIALIZE = (RASBASE + 111)

' Biplex port initializing.  Wait a few seconds and redial.
Public Const ERROR_BIPLEX_PORT_NOT_AVAILABLE = (RASBASE + 112)

' No active ISDN lines are available.
Public Const ERROR_NO_ACTIVE_ISDN_LINES = (RASBASE + 113)

' No ISDN channels are available to make the call.
Public Const ERROR_NO_ISDN_CHANNELS_AVAILABLE = (RASBASE + 114)

' Too many errors occured because of poor phone line quality.
Public Const ERROR_TOO_MANY_LINE_ERRORS = (RASBASE + 115)

' The Remote Access IP configuration is unusable.
Public Const ERROR_IP_CONFIGURATION = (RASBASE + 116)

' No IP addresses are available in the static pool of Remote Access IP addresses.
Public Const ERROR_NO_IP_ADDRESSES = (RASBASE + 117)

' Timed out waiting for a valid response from the remote PPP peer.
Public Const ERROR_PPP_TIMEOUT = (RASBASE + 118)

' PPP terminated by remote machine.
Public Const ERROR_PPP_REMOTE_TERMINATED = (RASBASE + 119)

' No PPP control protocols configured.
Public Const ERROR_PPP_NO_PROTOCOLS_CONFIGURED = (RASBASE + 120)

' Remote PPP peer is not responding.
Public Const ERROR_PPP_NO_RESPONSE = (RASBASE + 121)

' The PPP packet is invalid.
Public Const ERROR_PPP_INVALID_PACKET = (RASBASE + 122)

' The phone number including prefix and suffix is too long.
Public Const ERROR_PHONE_NUMBER_TOO_LONG = (RASBASE + 123)

' The IPX protocol cannot dial-out on the port because the machine is an IPX router.
Public Const ERROR_IPXCP_NO_DIALOUT_CONFIGURED = (RASBASE + 124)

' The IPX protocol cannot dial-in on the port because the IPX router is not installed.
Public Const ERROR_IPXCP_NO_DIALIN_CONFIGURED = (RASBASE + 125)

' The IPX protocol cannot be used for dial-out on more than one port at a time.
Public Const ERROR_IPXCP_DIALOUT_ALREADY_ACTIVE = (RASBASE + 126)

' Cannot access TCPCFG.DLL.
Public Const ERROR_ACCESSING_TCPCFGDLL = (RASBASE + 127)

' Cannot find an IP adapter bound to Remote Access.
Public Const ERROR_NO_IP_RAS_ADAPTER = (RASBASE + 128)

' SLIP cannot be used unless the IP protocol is installed.
Public Const ERROR_SLIP_REQUIRES_IP = (RASBASE + 129)

' Computer registration is not complete.
Public Const ERROR_PROJECTION_NOT_COMPLETE = (RASBASE + 130)

' The protocol is not configured.
Public Const ERROR_PROTOCOL_NOT_CONFIGURED = (RASBASE + 131)

' The PPP negotiation is not converging.
Public Const ERROR_PPP_NOT_CONVERGING = (RASBASE + 132)

' The PPP control protocol for this network protocol is not available on the server.
Public Const ERROR_PPP_CP_REJECTED = (RASBASE + 133)

' The PPP link control protocol terminated.
Public Const ERROR_PPP_LCP_TERMINATED = (RASBASE + 134)

' The requested address was rejected by the server.
Public Const ERROR_PPP_REQUIRED_ADDRESS_REJECTED = (RASBASE + 135)

' The remote computer terminated the control protocol.
Public Const ERROR_PPP_NCP_TERMINATED = (RASBASE + 136)

' Loopback detected.
Public Const ERROR_PPP_LOOPBACK_DETECTED = (RASBASE + 137)

' The server did not assign an address.
Public Const ERROR_PPP_NO_ADDRESS_ASSIGNED = (RASBASE + 138)

' The authentication protocol required by the remote server cannot use the Windows NT encrypted password.  Redial, entering the password explicitly.
Public Const ERROR_CANNOT_USE_LOGON_CREDENTIALS = (RASBASE + 139)

' Invalid TAPI configuration.
Public Const ERROR_TAPI_CONFIGURATION = (RASBASE + 140)

' The local computer does not support encryption.
Public Const ERROR_NO_LOCAL_ENCRYPTION = (RASBASE + 141)

' The remote server does not support encryption.
Public Const ERROR_NO_REMOTE_ENCRYPTION = (RASBASE + 142)

' The remote server requires encryption.
Public Const ERROR_REMOTE_REQUIRES_ENCRYPTION = (RASBASE + 143)

' Cannot use the IPX network number assigned by remote server.  Check the event log.
Public Const ERROR_IPXCP_NET_NUMBER_CONFLICT = (RASBASE + 144)

' ERROR_INVALID_SMM
Public Const ERROR_INVALID_SMM = (RASBASE + 145)

' ERROR_SMM_UNINITIALIZED
Public Const ERROR_SMM_UNINITIALIZED = (RASBASE + 146)

' ERROR_NO_MAC_FOR_PORT
Public Const ERROR_NO_MAC_FOR_PORT = (RASBASE + 147)

' ERROR_SMM_TIMEOUT
Public Const ERROR_SMM_TIMEOUT = (RASBASE + 148)

' ERROR_BAD_PHONE_NUMBER
Public Const ERROR_BAD_PHONE_NUMBER = (RASBASE + 149)

' ERROR_WRONG_MODULE
Public Const ERROR_WRONG_MODULE = (RASBASE + 150)

' Invalid callback number.  Only the characters 0 to 9, T, P, W, =(, ), -, @, and space are allowed in the number.
Public Const ERROR_INVALID_CALLBACK_NUMBER = (RASBASE + 151)

' A syntax error was encountered while processing a script.
Public Const ERROR_SCRIPT_SYNTAX = (RASBASE + 152)
Public Const RASBASEEND = (RASBASE + 152)

'*---------------------------------------------------------------
'* RAS DLL Function Declarations
'*---------------------------------------------------------------
Public Declare Function RasGetErrorString Lib "RASAPI32" Alias "RasGetErrorStringA" ( _
  ByVal uErrorValue As Long, _
  ByVal lpszErrorString As String, _
  ByVal cBufSize As Long _
) As Long

'*---------------------------------------------------------------
'* Public Variables
'*---------------------------------------------------------------
Public lngRASErrorNumber As Long
Public strRASErrorMessage As String
Public lpRASError As clsRASError

'*---------------------------------------------------------------
'* EOF: basRASError
'*---------------------------------------------------------------
